#!usr/bin/env python
# -*- coding: utf-8 -*-
from flask import (Blueprint, render_template, request, jsonify)

from ._base import BaseView

bp = Blueprint('api', __name__)


class IndexView(BaseView):
    def get(self, *args, **kwargs):
        return jsonify(code=0, message='success', data='this is api')

    def post(self, *args, **kwargs):
        self.get(args, kwargs)


bp.add_url_rule('', view_func=IndexView.as_view('index'))
